package anx;

import static org.junit.Assert.assertEquals;
import org.junit.Test;

/**
 * This test checks to see that the proper firepower is used.
 * @author Anthony Xu
 *
 */
public class TestRunnerEfficientFiring {

  /**
   * Asserts that runner shoots with a power proportional to the distance of the enemy.
   * 
   */
  @Test
  public void testEfficientFiring() {
    Runner test = new Runner();
    //tests a long range shot
    assertEquals("Long-range shot", test.efficientFiring(1000), 0.4, 0.0);
    //tests a medium range shot
    assertEquals("Medium-range shot", test.efficientFiring(200), 2, 0.0);
    //tests a short range shot
    assertEquals("Short-range shot", test.efficientFiring(0), 3.0, 0.0);
  }
  
}
